package com.liaoyifan.core.generator;

import java.util.Map;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;

@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class ServiceModel {

    public static void build(Map<String, Object> dataModel) {
        ConverterModel.build(dataModel);
        MapperModel.build(dataModel);
        dataModel.putIfAbsent(
                "servicePackage",
                dataModel.get("modulePackage") + "." + Model.SERVICE.name().toLowerCase());
        dataModel.putIfAbsent(
                "serviceName", dataModel.get("entityName") + Model.SERVICE.getSuffix());
    }
}
